// Copyright 2012 Dorival de Moraes Pedroso. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// +build ignore

package main

import (
    "fmt"
    "code.google.com/p/gemlab"
)

func main() {
    rg := gemlab.Sregions{
        []int{-1, -2, -3},     // region tags
        []int{ 4,  4,  4},     // Nx
        []int{ 3,  3,  3},     // Ny
        []int{ 1,  1,  1},     // Nz
        []float64{-2,  2, -2}, // Ax
        []float64{-2, -2,  2}, // Ay
        []float64{ 0,  0,  0}, // Az
        []int{0, 0, 0},        // NlX
        []int{0, 0, 0},        // NlY
        []int{0, 0, 0},        // NlZ
        [][]float64{    // points
            {0.0, 0.0}, // x,y-values
            {1.5, 0.0},
            {1.5, 1.0},
            {0.0, 1.0},
            {3.0, 0.0},
            {3.0, 1.0},
            {1.5, 2.0},
            {0.0, 2.0},
        },
        [][]int{ // regions connectivity
            {0, 1, 2, 3},
            {1, 4, 5, 2},
            {3, 2, 6, 7},
        },
        [][]int{ // boundary tags
            {-10,   0,   0, -17},
            {-11, -12, -13,   0},
            {  0, -14, -15, -16},
        },
    }
    le := gemlab.Lregions{
        []int{-4}, // rtags
        []int{-5}, // jtags
        []int{ 1}, // quads
        [][]float64{    // points
            {0.0, 2.0}, // x,y-values
            {2.0, 0.0},
        },
        [][]int{ // connectivity
            {0, 1},
        },
        [][]int{ // boundary tags
            {-6, -66}, // left, right
        },
    }
    quad := false
    err  := gemlab.SmeshGen("t_smesh02", quad, &rg, &le)
    if err != nil {
        fmt.Printf("%v\n", err.Error())
    }
}
